


#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <winapi/shlwapi.h>



#include "xCore.h"



#pragma comment (lib, "shell32")
#pragma comment (lib, "user32")
#pragma comment (lib, "kernel32")
#pragma comment (lib, "shlwapi")
#pragma comment (lib, "comdlg32")
#pragma comment (lib, "gdi32")
#pragma comment (lib, "ole32")



int main(int argc, astr* argv)
{
	xCoreInit();
	wstr sAppPath = xCore_AppPathW();
	wstr sLogPath = Path_JoinW(sAppPath, L"报告");
	wstr sMapPath = Path_JoinW(sAppPath, L"运行报告浏览器");
	wstr sIniFile = Path_JoinW(sMapPath, L"app.ini");
	/* 64位 Sciter 有 BUG，这里只运行固定文件
	#if defined(__x86_64__) || defined(_WIN64)
		wstr sExeFile = Path_JoinW(sMapPath, L"xLogView64.exe");
	#else
		wstr sExeFile = Path_JoinW(sMapPath, L"xLogView32.exe");
	#endif
	*/
	wstr sExeFile = Path_JoinW(sMapPath, L"xLogView.exe");
	Ini_WriteW(sIniFile, L"app", L"workpath", sLogPath);
	xCore_RunW(sExeFile, SW_SHOW);
	return 0;
}


